import { Commit } from "vuex";

interface IHalfNav {
  create_time: string;
  floor_color: string;
  floor_img: string;
  horizonta_num: number;
  id: string;
  is_del: string;
  name: string;
  title: string;
  title_two: string;
  vertical_num: number;
  horizontal?: IHalfList[];
  vertical: IHalfList[];
}
interface IHalfList {
  id: string;
  item_id: string;
  floor_id: string;
  xiaoliang: string;
  name: string;
  pic_url: string;
  hd_leixing: null;
  activity_type: string;
  price: number;
  want_to_buy_num: string;
  sale_price: number;
  use_quan: string;
  coupon_amount: number;
  discount_label: [];
  self_selling_point: string;
  is_save: string;
  month_sale_num: string;
}

interface IState {
  halfNav: Partial<IHalfNav>[];
}
interface IAction {
  type: string;
  payload: Partial<IHalfNav>[];
}
interface IHalf {
  namespaced: boolean;
  state: IState;
  actions: {
    getHalfList: ({ commit }: { commit: Commit }) => void;
  };
  mutations: {
    GET_HALF_LIST: (state: IState, action: IAction) => void;
  };
}
export default IHalf;
